package org.berlin.octane2m.init;

/**
 * This process is the father (mother) of all Minix user processes.  When
 * Minix comes up, this is process number 2, and has a pid of 1.  It
 * executes the /etc/rc shell file, and then reads the /etc/ttytab file to
 * determine which terminals need a login process.
 *
 * If the files /usr/adm/wtmp and /etc/utmp exist and are writable, init
 * (with help from login) will maintain login accounting.  Sending a
 * signal 1 (SIGHUP) to init will cause it to rescan /etc/ttytab and start
 * up new shell processes if necessary.  It will not, however, kill off
 * login processes for lines that have been turned off; do this manually.
 * Signal 15 (SIGTERM) makes init stop spawning new processes, this is
 * used by shutdown and friends when they are about to close the system
 * down.
 */
public class Init {

    /**
     * Main loop. If login processes have already been started up, wait for one
     * to terminate, or for a HUP signal to arrive. Start up new login processes
     * for all ttys which don't have them. Note that wait() also returns when
     * somebody's orphan dies, in which case ignore it.  If the TERM signal is
     * sent then stop spawning processes, shutdown time is near.
     */
    public void main() {
        
    }
    
    public void onhup(int sig) {
        
    }
    
    public void onterm(int sig) {
        
    }
    
    public void onabrt(int sig) {
        
    }
    
    public void startup(int linenr) {
        
    }
    
    /**
     * Execute a command with a path search along /sbin:/bin:/usr/sbin:/usr/bin.
     */
    public void execute() {
        
    }
    
    public void wtmp() {
        
    }
    
    /**
     * Fork off a process for the indicated line
     */
    public void startup(int linenr, int ttyp) {
    }
    
    /**
     * Execute a command with a path search along /sbin:/bin:/usr/sbin:/usr/bin.
     */
    public void execute(char cmd) {
        
    }
    
    public void construct_argv(char cmd) {
        
    }
    
    public void tell() {
        
    }
    
    public void report() {
        
    }
    
} // End of the class //
